var r = require.context("./pages",true,/.vue/);
var arr = [];
var getTitle = function(title){
  return title;
}
r.keys().forEach((key)=>{
  var _keyarr = key.split('.');
  if(key.indexOf('index')!=-1){
    arr.push({
      path:_keyarr[1],
      component: function (resolve) {
        require.ensure([], function () {
          resolve(r(key));
        });
      }
    })
  }else {
    arr.push({
      path: _keyarr[1]+'/'+_keyarr[2],
      component: function (resolve) {
        require.ensure([], function () {
          resolve(r(key));
        });
      }
    })
  }
})
export default arr;
